import * as types from './ActionTypes.js';
import { createAction } from 'redux-actions';
import {fetchRequest} from '../util/fetch';

//邮箱注册验发送证码
export const AddemailAction = createAction(types.ADDEMAIL,(data)=>{
    return fetchRequest('XzRegister/addEmail.go','POST',data);
});
//对比邮箱验证码并完成注册
export const SelemailAction = createAction(types.SELEMAIL,(data)=>{
    return fetchRequest('XzRegister/selEmail.go','POST',data);
});
//手机注册验发送证码
export const AddphonelAction = createAction(types.ADDPHONE,(data)=>{
    return fetchRequest('XzRegister/addPhone.go','POST',data);
});
//对比手机验证码并完成注册
export const SelphoneAction = createAction(types.SELPHONE,(data)=>{
    return fetchRequest('XzRegister/selPhone.go','POST',data);
});